package com.houry.spring.factorybean;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @Desc
 * @Author houruiyang
 * @Date 2022/2/25
 **/

public class MyFactoryBean implements FactoryBean {

    private String message;

    public MyFactoryBean(String message) {
        this.message = message;
    }

    @Override
    public Object getObject() throws Exception {
        return new MyFactoryBean("自定义的");
    }

    @Override
    public Class<?> getObjectType() {
        return MyFactoryBean.class;
    }
}
